<?php
 $link = mysql_connect('localhost', 'kootenay', 'nonsense');
 if (!$link) {
  die ('Not connected : ' . mysql_error());
 }
 $db_selected = mysql_select_db('kootenay', $link);

 if (!$db_selected) {
  die ('Can\'t use foo : ' . mysql_error());
 }
 
 $keywords = array();
 
$query='SELECT album_id, playbox_date FROM ml_albums';
$result= mysql_query($query);
while ($row = mysql_fetch_array($result) )
{
	$album_id = $row[0];
	$playbox_date = $row[1];
	
	if ($playbox_date)
	{
	
	$update_query = 'UPDATE ml_albums SET playbox_p ="P" WHERE album_id = "'.$album_id.'"';
	$update_result = mysql_query ($update_query); echo $update_query;
	if ($update_result) echo "     updated " . $album_id. "  ";
	
	//echo " album: $album_id  keywords:  $keywords_string"; echo "<br>";
		
	}
	
	echo "     testing: " . $album_id. "  $playbox_date <br>";
	
}
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>
